<template>
	<div>
		<button @click="isShow = !isShow">显示/隐藏</button>
		<transition>
			<h1 v-show="isShow">你好啊1！</h1>
		</transition>
	</div>
</template>

<script>
	export default {
		name:'App',
		data() {
			return {
				isShow:true
			}
		},
	}
</script>

<style scoped>
	h1{
		background-color: orange;
		transition: 1s linear;
	}
	/* 离开的起点 来的终点 */
	.v-leave,.v-enter-to{
		transform: translateX(0px);
	}
	/* 离开的终点 来的起点*/
	.v-leave-to,.v-enter{
		transform: translateX(-100%);
	}
</style>